cc.Class({
    extends: cc.Component,

    properties: {
        sidePrefab: {default: null,type: cc.Prefab}
    },

    onLoad(){
        console.log('start load');
    },
    onClick(){
        console.log('点击打开侧边栏')
        let side = cc.instantiate(this.sidePrefab);
        side.parent = this.node;
        side.active = true;
    }

});
